﻿using System;

public partial class NewUser : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (string.Compare(tbPwd.Text, tbPwdConfirm.Text) == 0)
        {
            var helper = new WebUserHelper(Server.MapPath("webusers.xml"));
            helper.AddAccount(tbUser.Text, tbPwd.Text);
            Session["webuser"] = tbUser.Text;
            Response.Redirect("Default.aspx");
        }       
    }
}